home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
198_02
/
main.c
< prev
next >
Wrap
Text File
|
1990-01-21
|
56KB
|
1,612 lines
/*
* MicroEMACS 3.9
* written by Dave G. Conroy.
* substatially modified by Daniel M. Lawrence
*
* (C)opyright 1987 by Daniel M. Lawrence
* MicroEMACS 3.9 can be copied and distributed freely for any
* non-commercial purposes. MicroEMACS 3.9 can only be incorporated
* into commercial software with the permission of the current author.
*
* This file contains the main driving routine, and some keyboard processing
* code, for the MicroEMACS screen editor.
*
* REVISION HISTORY:
*
* 1.0 Steve Wilhite, 30-Nov-85
* - Removed the old LK201 and VT100 logic. Added code to support the
* DEC Rainbow keyboard (which is a LK201 layout) using the the Level
* 1 Console In ROM INT. See "rainbow.h" for the function key defs
* Steve Wilhite, 1-Dec-85
* - massive cleanup on code in display.c and search.c
*
* 2.0 George Jones, 12-Dec-85
* - Ported to Amiga.
*
* 3.0 Daniel Lawrence, 29-Dec-85
* - rebound keys/added new fast buffered I/O for AMIGA
* - added META- repeat commands
* - added reposition default to center screen (yeah!)
* - changed exit with modified buffers message
* - made filesave tell us what it is doing
* - changed search string entry to terminate with <ESC>
* so we can use <NL> in search/replace strings
* - updated version number in mode line to 3.0
* 12-Jan-86
* - Added code to reconize the search/replace functions
* - Added code to perform search/replace & query functions
* 14-Jan-86
* - moved search logic to separate function in search.c
* - added replace and query replace functions
* - separated out control key expansions to be used by others in search.c
* 15-Jan-86
* - changed "visiting" to finding
* - changed yes/no responses to not need return
* - cleaned up various messages
* 16-jan-86
* - fixed spurious spawn message in MSDOS
* - added ^X-S synonym to save command
* - moved escape to shell to ^X-C
* 21-jan-86
* - added code to suspend shell under BSD
* 22-jan-86
* - added function key support (SPEC) under MSDOS
* - Abort now prints [Aborted] on message line
* 23-jan-86
* - Added modes and commands to set/unset them
* 24-jan-86
* - Added Goto Line command
* - added Rename Buffer command
* 28-jan-86
* - added goto beginning and end of paragraph commands (META-P/META-N)
* - re-wrote kdelete to use realloc. Gained MUCH speed here when
* doing large wipes on both UNIX and MSDOS. Changed kill buffer
* allocation block size from 256 bytes to 1 k
* 29-jan-86
* - moved extern function declarations to efunc.h
* - made name[] name binding table
* 30-jan-86
* - fixed Previous/Next paragraph command not to wrap around EOF
* - added Fill Paragraph command (META-Q)
* 4-feb-86
* - added code to properly display long lines, scrolling them right
* to left
* 5-feb-85
* - rewrote code to right/left scroll...much better
* - added shifted arrow keys on IBMPC
* 6-feb-85
* - add option to allow forward-word to jump to beginning of
* next word instead of end of current one. This is different from
* other emacs' but can be configured off in estruct.h
* - added VIEW mode to allow a buffer to be read only
* (-v switch on command line will activate this)
* - changed quick exit to write out ALL changed buffers!!!
* MAKE SURE YOU KNOW THIS WHEN META-Zing
* 10-feb-86
* - added handling of lines longer than allowed on file read in
* (they wrap on additional lines)
* - made having space clear the message line and NOT insert itself
* a configuration option in ed.h
* 11-feb-86
* - added Describe-command and Help commands.
* 13-feb-86
* - added View file command (^X ^V) and finished HELP command
* 14-feb-86
* - added option to let main loop skip update if type ahead commands
* are queued up
* 16-feb-86
* - added Insert File command
* 17-feb-86
* - added scroll next window up/down commands
* 18-feb-86
* - added CMODE indentation
* - re-arranged header files to standardize extern and global
* definitions
* - changed version number to 3.2
* - added numeric arguments to search, reverse search and
* search and replace
* 24-feb-86
* - added Bind To Key function (^C for now) to allow the user
* to change his command keys
* - added Unbind key function (M-^C for now)
* - added execute named command to execute unbound commands (M-X)
* - added describe bindings command (not bound)
* - changed version number to 3.3
* 25-feb-86
* - scrapped CERROR mode (too many compilers)
* - added EXACT mode for case sensitive searchers
* 26-feb-86
* - added command completion on execute named command and
* all routined grabbing a command name
* - adding execute-command-line command and its support functions
* (in preparation for sourcing files)
* - added Execute Buffer command
* 27-feb-86
* - added execute(source) file command and added code to automatically
* execute emacs.rc (or .emacsrc on UNIX) before initial read in
* - changed version number to 3.4
* 4-mar-86
* - changed word delete to be consistant with word move (it gets
* rid of the inter word space now) This is configurable with the
* NFWORD symbol in estruct.h
* - added B_ACTIVE entry to the buffer table. Let emacs read multiple
* file names from the command line and only read them in as needed
* 5-mar-85
* - rewrote command line parser to get rid of my patchy code
* - changed version number to 3.5
* 1-apr-86
* - added support for Aztec C 3.20e under MSDOS
* - fixed bug in mlwrite on ADM3's and their ilk under V7
* - added insertion of pounds in column one under CMODE
* - changed version number to 3.6
* 3-apr-86
* - added next-buffer command (^X-X)
* 5-apr-86
* - added kill paragraph command (M-^W)
* - changed fill-paragraph to leave 2 spaces after a period at the
* end of a word.
* - added OVERWRITE mode
* 7-apr-86
* - fixed overwrite mode to handle tabs
* 8-apr-86
* - added add/delete global mode (<ESC>M & <ESC> ^M) commands
* 9-apr-86
* - added insert space command
* - moved bindings around ^C insert space
* M-K bind-to-key
* INSERT insert space
* DELETE forwdel
* - added hunt forward and hunt reverse commands
* 10-apr-86
* - fixed bug in DOBUF with non-terminated command string
* 15-apr-86
* - fixed tab expansion bug in DISPLAY which hung the AMIGA
* (sent in by Dawn Banks)
* - fixed curcol problen if forwline/backline during keyboard
* macro execution (sent in by Ernst Christen)
* - added AMIGA function/cursor key support
* - fixed nonterminating <NL> replacement bug
* - fixed word wrapping problems
* 16-apr-86
* - updated documentation and froze development for 3.6 net release
* 23-apr-86 version 3.6a
* - added foreground and background colors. Setable with the
* add mode commands for the moment
* 24-apr-86
* - added command to pipe CLI output to a buffer
* 25-apr-86
* - added Dana Hoggatt's code to replace Lattice's sick system()
* function. Now we no longer care what the switchar is.
* - cleaned up the positioning on several of the spawing commands
* 26-apr-86
* - added an output flush in vttidy(). Unix really appreciates this.
* - added filter-buffer (^X#) command to send a buffer through
* a DOS filter
* - made automatic CMODE on .c and .h file compilation dependant
* in estruct.h
* 1-may-86
* - optimized some code in update(). It certainly need a lot more.
* - added Aztec profiling capabilities. These are conditional on
* the APROF symbol in estruct.h
* 2-may-86
* - added (u)ndo command in query-replace. undoes last repalce.
* 6-may-86
* - re-organized and wrote the update() function in display.c
* Now my color hacks are in the right places and the code can be
* understood.
* [Released version 3.6f for BETA test sites]
* 8-may-86
* - fixed bug in new display routine to wrap cursor on extended
* lines at the right time
* - modified the buffer-position command to give reasonable info
* 9-may-86
* - improved